<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        html,
        body {
            height: 100%;
            position: relative;
        }

        .main {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: 400px;
            height: 400px;
            border-radius: 50%;
            border: 10px solid black;
        }

        .clock {
            position: absolute;
            width: 100%;
            height: 100%;
            /* transform: rotate(180deg); */
        }

        .clock div {
            position: absolute;
            transform-origin: top;
            left: 50%;
            top: 50%
        }

        .hour {
            height: 110px;
            width: 5px;
            background-color: red;
        }

        .minute {
            height: 160px;
            width: 5px;
            background-color: red;
        }

        .second {
            height: 190px;
            width: 5px;
            background-color: red;
        }
    </style>
</head>

<body>
    <div class="main">
        <div class="clock">
            <div class="hour"></div>
            <div class="minute"></div>
            <div class="second"></div>
        </div>
    </div>
    <script>
        const hour = document.querySelector('.hour')
        const minute = document.querySelector('.minute')
        const second = document.querySelector('.second')
        let date, h, m, s
        const x = () => {
            date = new Date()
            s = date.getSeconds()
            h = date.getHours()
            m = date.getMinutes()
            hour.style.transform = `rotate(${h * 30 + 180}deg)`
            minute.style.transform = `rotate(${m * 6 + 180}deg)`
            second.style.transform = `rotate(${s * 6 + 180}deg)`
        }
        setInterval(() => {
            x()
        }, 0)


    </script>
</body>

</html>